﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colors.xaml" />
        <ResourceDictionary Source="Icons.xaml" />
        <ResourceDictionary Source="Controls.DocumentViewer.xaml" />

    </ResourceDictionary.MergedDictionaries>


    <Style x:Key="CMButton_WhiteBack" TargetType="{x:Type Button}">
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="BorderBrush" Value="#FF871D1D" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource AccentColorBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="3" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="contentPresenter"
                                          Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Cursor="Hand"
                                          Opacity="1"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value="0.8" />
            </Trigger>
            <Trigger Property="IsPressed" Value="False">
                <Setter Property="Opacity" Value="1" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource AccentColorBrush}" />
                <Setter Property="Foreground" Value="White" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="False">
                <Setter Property="Background" Value="Transparent" />
                <Setter Property="Foreground" Value="Black" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource IdealForegroundDisabledBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="CMToogleButton_WhiteBack" TargetType="{x:Type ToggleButton}">
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="BorderBrush" Value="#FF871D1D" />
        <Setter Property="Background" Value="White" />
        <Setter Property="Foreground" Value="{DynamicResource AccentColorBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="3" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="contentPresenter"
                                          Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Cursor="Hand"
                                          Opacity="1"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Background" Value="{DynamicResource AccentColorBrush}" />
                <Setter Property="Foreground" Value="White" />
            </Trigger>
            <Trigger Property="IsChecked" Value="False">
                <Setter Property="Background" Value="White" />
                <Setter Property="Foreground" Value="Black" />
            </Trigger>


            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value="0.8" />
            </Trigger>
            <Trigger Property="IsPressed" Value="False">
                <Setter Property="Opacity" Value="1" />
            </Trigger>


            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value="0.5" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="False">
                <Setter Property="Opacity" Value="1" />
            </Trigger>

            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource IdealForegroundDisabledBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>